const pageProps = require('../tw-lib-base/page/props')

module.exports = {
  paddingY: {
    type: String,
    default: '',
    name: '导航上下内边距',
    filedType: 'string'
  },

  paddingX: {
    type: String,
    default: '',
    name: '导航左右内边距',
    filedType: 'string'
  },

  logo: {
    type: String,
    default: [],
    name: 'logo图片',
    filedType: 'file',
    limit: 1,
    maxSize: 1024
  },

  logoHeight: {
    type: String,
    default: '50px',
    name: 'logo图片高度',
    filedType: 'string'
  },

  mrLength: {
    type: String,
    default: '5px',
    name: 'logo离右侧的边距',
    filedType: 'string'
  },

  title: {
    type: String,
    default: '页面标题',
    name: '标题',
    filedType: 'string'
  },

  titleHref: {
    type: String,
    default: './index.html',
    name: '点击标题时的跳转地址',
    filedType: 'string'
  },

  titleFontSize: {
    type: String,
    default: '18px',
    name: '标题字体大小',
    filedType: 'string'
  },
  titleLineHeight: {
    type: String,
    default: '',
    name: '标题字体行高',
    filedType: 'string'
  },

  titleIsBold: {
    type: Boolean,
    default: true,
    name: '标题显示为粗体',
    filedType: 'switch'
  },

  enableMediaQuery: {
    type: Boolean,
    default: false,
    name: '启用媒体查询',
    filedType: 'switch'
  },

  mediaPoint: {
    type: Array,
    default () {
      return [
        '1024px',
        '1200px'
      ]
    },
    name: '内容区媒体查询断点',
    nameTip: '请从小到大指定媒体查询断点',
    filedType: 'list',
    subType: 'string',
    subDefault: '',
    max: 6,
    vif: {
      key: 'enableMediaQuery',
      value: true
    }
  },

  mediaPointWidth: {
    type: Array,
    default () {
      return [
        '100%',
        '1200px'
      ]
    },
    name: '媒体查询断点对应的内容宽度',
    nameTip: '请从小到大指定媒体查询断点的宽度',
    filedType: 'list',
    subType: 'string',
    subDefault: '',
    max: 6,
    vif: {
      key: 'enableMediaQuery',
      value: true
    }
  },

  noticeHref: {
    type: String,
    default: '/#/',
    name: '消息跳转地址',
    nameTip: '置为空会隐藏消息中心图标',
    filedType: 'string'
  },

  noLogoff: {
    type: Boolean,
    default: false,
    name: '不显示退出按钮',
    filedType: 'switch'
  },

  logoffhref: {
    type: Boolean,
    default: false,
    name: '开启登录模块在首页',
    filedType: 'switch'
  },

  navList: {
    type: Array,
    default () {
      return [
        {
          name: '导航1',
          href: './nav1.html',
          activeText: 'nav'
        },
        {
          name: '导航2',
          href: '/nav2.html',
          target: '_blank'
        },
        {
          name: '权限导航',
          href: '/role.html',
          roles: ['1000000002']
        },
        {
          name: '导航3',
          activeText: 'nav2',
          children: [
            {
              name: '子导航1',
              href: '/sub-nav1'
            },
            {
              name: '子导航2',
              href: '/sub-nav1',
              children: [
                {
                  name: '三级导航1',
                  href: '/lv3-1'
                },
                {
                  name: '三级导航2',
                  href: '/lv3-2'
                },
                {
                  name: '三级导航2',
                  href: '/lv3-2'
                },
                {
                  name: '三级导航2',
                  href: '/lv3-2'
                },
                {
                  name: '三级导航2',
                  href: '/lv3-2'
                },
                {
                  name: '三级导航2',
                  href: '/lv3-2'
                },
                {
                  name: '三级导航2',
                  href: '/lv3-2'
                }
              ]
            }
          ]
        }
      ]
    },
    name: '导航列表',
    filedType: 'api'
  },

  navVifFunction: {
    type: Function,
    default: '',
    name: '菜单是否显示的回调函数',
    nameTip: '接受的第一个参数为菜单本身，第二个参数导航菜单列表，返回true显示，返回false不显示',
    placeholder: 'function handler(nav, navList) {\n  \n}',
    filedType: 'function'
  },

  ...pageProps,

  userInfoList: {
    type: Array,
    default () {
      return [
      ]
    },
    name: '用户信息下拉列表',
    nameTip: '每一项应该是一个对象，对象的属性对应为：\nname：必需，导航名称\nhref：可选，跳转地址\ntarget：默认为_balnk，在新窗口打开，_self为在当前窗口中打开，导航名称\nisLogoff：可选，是否显示为退出按钮',
    filedType: 'api'
  },

  newNotices: {
    type: String,
    default () {
      return { count: 0 }
    },
    name: '新消息数',
    filedType: 'api'
  },

  clickNavHandler: {
    type: Function,
    name: '点击导航回调函数',
    placeholder: 'function clickNavHandler (nav, navs){\n  \n}',
    nameTip: '回调函数的第一个参数nav为当前导航，每二个参数navs为导航列表;返回false时，会取消跳转',
    filedType: 'function'
  },

  navFontSize: {
    type: String,
    default: '16px',
    name: '导航字体大小',
    filedType: 'string'
  },

  bgColor: {
    type: String,
    default: '#fff',
    name: '背景颜色',
    filedType: 'color'
  },

  color: {
    type: String,
    default: '#333',
    name: '文本颜色',
    filedType: 'color'
  },

  activeColor: {
    type: String,
    default: '#0d76f5',
    name: '导航高亮颜色',
    nameTip: 'activeStr，省略时，浏览器url包括当前导航url才会被判断为选中，有值时，则导航url包含其值即判断为选中',
    filedType: 'color'
  },

  iconColor: {
    type: String,
    default: '#a8b0b3',
    name: '图标颜色',
    filedType: 'color'
  },

  iconColorHover: {
    type: String,
    default: '#0d76f5',
    name: '图标滑过颜色',
    filedType: 'color'
  },

  poppaneBg: {
    type: String,
    default: '#ffffff',
    name: '下拉面板背景',
    filedType: 'color'
  },

  poppaneShadownColor: {
    type: String,
    default: '#cccccc',
    name: '下拉面板投影色',
    filedType: 'color'
  },

  poppaneColor: {
    type: String,
    default: '#333333',
    name: '下拉菜单文本色',
    filedType: 'color'
  },

  menuActiveBg: {
    type: String,
    default: '#0d76f5',
    name: '下拉菜单滑过背景',
    filedType: 'color'
  },

  menuActiveColor: {
    type: String,
    default: '#ffffff',
    name: '下拉菜单滑过文本色',
    filedType: 'color'
  },

  loginBtnFontSize: {
    type: String,
    default: '16px',
    name: '登录按钮字体大小',
    filedType: 'string'
  },

  loginBtnColor: {
    type: String,
    default: '#ffffff',
    name: '登录按钮文本颜色',
    filedType: 'color'
  },

  loginBtnHoverColor: {
    type: String,
    default: '#ffffff',
    name: '登录按钮文本滑过颜色',
    filedType: 'color'
  },

  loginBtnBg: {
    type: String,
    default: '#0084f7',
    name: '登录按钮背景',
    filedType: 'color'
  },

  loginBtnHoverBg: {
    type: String,
    default: '#0472d2',
    name: '登录按钮滑过背景',
    filedType: 'color'
  },

  loginBorderRadius: {
    type: String,
    default: '5px',
    name: '登录按钮圆角大小',
    filedType: 'string'
  },

  isFixed: {
    type: Boolean,
    default: false,
    name: '是否启用吸顶',
    filedType: 'switch'
  },

  fixedDistance: {
    type: String,
    default: 0,
    name: '吸顶距离',
    filedType: 'string',
    vif: {
      key: 'isFixed',
      value: true
    }
  },

  fixedShadowColor: {
    type: String,
    default: '',
    name: '吸顶时的投影色',
    filedType: 'color',
    vif: {
      key: 'isFixed',
      value: true
    }
  },

  useSearch: {
    type: Boolean,
    default: false,
    name: '显示搜索',
    filedType: 'switch'
  },

  linkSearch: {
    type: String,
    default: './',
    name: '搜索地址',
    filedType: 'string',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  navShrinkzIndex: {
    type: String,
    default: '6002',
    name: '菜单弹窗z-index',
    filedType: 'string'
  },

  value: {
    type: String,
    default: '',
    name: '搜索值',
    filedType: 'value',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  fontSizeSearch: {
    type: String,
    default: '14px',
    name: '搜索框字体大小',
    filedType: 'string',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  colorSearch: {
    type: String,
    default: '#333333',
    name: '搜索框字体颜色',
    filedType: 'color',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  borderColorSearch: {
    type: String,
    default: '#a8b0b3',
    name: '搜索框边框颜色',
    filedType: 'color',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  iconFontSizeSearch: {
    type: String,
    default: '18px',
    name: '搜索框图标大小',
    filedType: 'string',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  iconColorSearch: {
    type: String,
    default: '#a8b0b3',
    name: '搜索框图标颜色',
    filedType: 'color',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  iconHoverColorSearch: {
    type: String,
    default: '#a8b0b3',
    name: '搜索框图标滑过颜色',
    filedType: 'color',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  iconBgColorSearch: {
    type: String,
    default: '',
    name: '搜索框图标背景颜色',
    filedType: 'color',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  placeholderSearch: {
    type: String,
    default: '搜索资讯',
    name: '搜索框提示语',
    filedType: 'string',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  placeholderColorSearch: {
    type: String,
    default: '#fff',
    name: '搜索框提示语颜色',
    filedType: 'color',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  widthSearch: {
    type: String,
    default: '150px',
    name: '搜索框宽度',
    filedType: 'string',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  borderRadiusSearch: {
    type: String,
    default: '20px',
    name: '搜索框圆角',
    filedType: 'string',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  inputPaddingSearch: {
    type: String,
    default: '0 30px 0 10px',
    name: '搜索内边距',
    filedType: 'string',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  marginLeftSearch: {
    type: String,
    default: '40px',
    name: '搜索框距左边距离',
    filedType: 'string',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  clickFn: {
    type: Function,
    default: '',
    name: '自定义搜索函数',
    nameTip: '第一个参数为组件的文本对象',
    filedType: 'function',
    vif: {
      key: 'useSearch',
      value: true
    }
  },

  notLoginBtn: {
    type: Boolean,
    default: false,
    name: '不显示登录按钮',
    filedType: 'switch'
  },
  ifOutLink: {
    type: Boolean,
    default: false,
    name: '是否开启外部链接',
    filedType: 'switch'
  },

  otherLink: {
    type: String,
    default: '',
    name: '跳转链接名称',
    filedType: 'string',
    vif: {
      key: 'ifOutLink',
      value: true
    }
  },

  toOhterUrl: {
    type: String,
    default: 'https://www.baidu.com/',
    name: '跳转链接地址',
    filedType: 'string',
    vif: {
      key: 'ifOutLink',
      value: true
    }
  },

  otherLinkColor: {
    type: String,
    default: '#333',
    name: '跳转链接字体颜色',
    filedType: 'color',
    vif: {
      key: 'ifOutLink',
      value: true
    }
  },

  otherLinkMulit: {
    type: Boolean,
    default: false,
    name: '是否开启多个外部链接',
    nameTip: '用逗号分隔',
    filedType: 'switch',
    vif: {
      key: 'ifOutLink',
      value: true
    }
  }
}
